package ${tablePath}.api;

import ${tablePath}.entity.${table.className};
import annotation.io.gitee.xiaouyudeguang.common.Api;
import annotation.io.gitee.xiaouyudeguang.common.ApiMapping;
import api.io.gitee.xiaouyudeguang.common.AbstractApi;
import constants.io.gitee.xiaouyudeguang.common.Headers;
import context.io.gitee.xiaouyudeguang.common.BeanContext;
import request.io.gitee.xiaouyudeguang.common.RequestDto;
import respose.io.gitee.xiaouyudeguang.common.ResultDto;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Collections;
import java.util.List;

import static ${package}.constants.ApiConstants.*;

 /**
  * ${table.comment}Api
  * @author ${author}
  * @since ${dateTime}
  */
@Api(contextId = "${table.className}Api", path = "/${lowerClassName}", value = SERVICE_NAME, url = SERVICE_DEFAULT_URL)
public interface ${table.className}Api extends AbstractApi<${table.className}> {

    static ${table.className}Api get() { return BeanContext.get(${table.className}Api.class);}

    @ApiMapping(method = RequestMethod.POST, tags = "查询${table.comment}列表", value = "/getList")
    default ResultDto<List<${table.className}>> getList(@RequestHeader(Headers.TENANT_ID) String tenantId,
                                                        @RequestHeader(Headers.APP_ID) String appId,
                                                        @RequestBody RequestDto<${table.className}> requestDto) throws Exception {
        return ResultDto.ok(Collections.emptyList());
    }
}